import request from '@/utils/request'

// 查询商品退货及退款列表
export function listReturn(query) {
  return request({
    url: '/order/return/list',
    method: 'get',
    params: query
  })
}

// 查询商品退货及退款详细
export function getReturn(orderId) {
  return request({
    url: '/order/return/' + orderId,
    method: 'get'
  })
}

// 新增商品退货及退款
export function addReturn(data) {
  return request({
    url: '/order/return',
    method: 'post',
    data: data
  })
}

// 修改商品退货及退款
export function updateReturn(data) {
  return request({
    url: '/order/return',
    method: 'put',
    data: data
  })
}

// 删除商品退货及退款
export function delReturn(orderId) {
  return request({
    url: '/order/return/' + orderId,
    method: 'delete'
  })
}

export function getReturnAll() {
  return request({
    url: '/order/return/productReturnAll',
    method: 'get'
  })
}

